<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@page import="cn.strong.gweva.common.business.entity.Environment"%><html>
<head>
<script type="text/javascript" src="<%=path%>/scripts/My97DatePicker/WdatePicker.js"></script>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>考核结果统计</title>
<link href="styles/core.css" rel="stylesheet" type="text/css">
<link href="styles/Master.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/common.js"></script>

<link href="scripts/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css">

<script>
var path = '<%=path%>';
var basePath = "<%=basePath%>";
</script>

<script type="text/javascript" src="scripts/statistic/eva_statistic.js"></script>

</head>

<body>

<form name="evaStatisticForm" method="post" onsubmit="return false;">

	<s:hidden name="resultId" id="resultId"></s:hidden>
	<s:hidden name="pagerEntity.pageInfo.pageNow" id="pageNow"></s:hidden>
	<h2 style="text-align: left">考核结果统计</h2>                                          
	
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="right" width="15%">
				年份：
			</td>
			<td align="left" width="25%">
				<s:textfield cssClass="Wdate" onclick="WdatePicker({el:'year', dateFmt:'yyyy'})"
					name="searchEntity.year" id="year" cssStyle="width: 90px;"></s:textfield>
			</td>
			<td align="right" width="15%">
				季度：
			</td>
			<td align="left" width="25%">
				<s:select list="#{'1':'第一季度', '2':'第二季度', '3':'第三季度', '4':'第四季度'}" headerKey="" headerValue="" cssStyle="width: 135px;"
					name="searchEntity.quarter" id="quarter"></s:select>
			</td>
			<td align="right" width="20%" rowspan="2">
				<input type="image" src="<%=basePath%>images/search.jpg" onclick="search();"></input>
				<!-- <input type="image" src="<%=basePath%>images/excel.jpg" onclick="excel();"></input> -->
			</td>
		</tr>
		<tr>
			<td align="right">
				工作人员：
				<input type="button" value="..." class="btn_mouseout" onclick="selectWorker();return false;"
					onmouseover="this.className='btn_mouseover'" onmouseout="this.className='btn_mouseout'"
					onmousedown="this.className='btn_mousedown'" onmouseup="this.className='btn_mouseup'">
			</td>
			<td align="left" colspan="3">
				<s:textfield name="searchEntity.workerCode" id="workerCode" cssClass="input" onblur="return getWorkerInfo();"></s:textfield>
				<s:label id="workerName" name="searchEntity.workerName"></s:label>
				<s:hidden id="hdnWorkerName" name="searchEntity.workerName"></s:hidden>
			</td>
		</tr>
	</table>

	<hr width="100%" align="left" size="1" color="#E1EEF8">

	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabHeader" id="dataInfo">
		<thead>
			<tr align="center" class="tdBg">
				<td style="text-align: center" nowrap="nowrap" width="5%" valign="middle"></td>
				<td style="text-align: center" nowrap="nowrap" width="15%" valign="middle">季度(年份)</td>
				<td style="text-align: center" nowrap="nowrap" width="40%" valign="middle">工作人员</td>
				<td style="text-align: center" nowrap="nowrap" width="10%" valign="middle">公共考核</td>
				<td style="text-align: center" nowrap="nowrap" width="10%" valign="middle">岗位考核</td>
				<td style="text-align: center" nowrap="nowrap" width="10%" valign="middle">季度出勤</td>
				<td style="text-align: center" nowrap="nowrap" width="10%" valign="middle">最终分数<br/>基础分<%=Environment.CONFIG.getBaseScore() %></td>
			</tr>
		</thead>
		<tbody>
			<s:if test="#request.pagerEntity.resultList.size==0">
		   		<tr>
		   			<td colspan="7" align="center">
		   				对不起！没有搜索到结果......
		   			</td>
		   		</tr>
		   	</s:if>
		   	<s:else>

				<s:set id="total" value="0"></s:set>
			    <s:set id="totalSum" value="0"></s:set>

				<s:iterator value="pagerEntity.resultList" id="evaStatistic" status="stas">
					<tr>
						<td align="center">
							<s:property value="#stas.index + 1"/>
						</td>
						<td>
							<s:property value="#evaStatistic.quarterCn"/>(<s:property value="#evaStatistic.yearStr"/>)
						</td>
						<td>
							<s:property value="#evaStatistic.workerCode"/>&nbsp;<s:property value="#evaStatistic.workerName"/>
						</td>
						<td align="right">
							<s:property value="#evaStatistic.publicScore"/>
							<s:if test="#evaStatistic.publicPercent != 1">
								<br/>总分*(<s:property value="#evaStatistic.publicPercent * 100"/>%)
							</s:if>
						</td>
						<td align="right">
							<s:property value="#evaStatistic.jobScore"/>
						</td>
						<td align="left">
							(总分+(<s:property value="#evaStatistic.quarterScore"/>))*(<s:property value="#evaStatistic.percent * 100"/>%)
						</td>
						<td align="right">
							<s:property value="#evaStatistic.score"/>
						</td>
					</tr>
				</s:iterator>
				<tr class="tdBg">
					<td colspan="7" align="right">
						<s:include value="/pages/pagefooter.jsp"></s:include>
					</td>
				</tr>
			</s:else>
		</tbody>
	</table>

</form>

<div id="waiting" style="display: none;">
	<div id="background" class="background"></div>
	<div id="progressBar" class="progressBar">数据加载中，请稍等...</div>
</div>

<form name="downloadFrm" id="downloadFrm" action="statistic/evaResult-export.action" method="post" target="downloadiFrame">
	<input type="hidden" name="evaResultSearchEntity.type" id="download_type">
	<input type="hidden" name="evaResultSearchEntity.workerName" id="download_workerName">
	<input type="hidden" name="evaResultSearchEntity.remark" id="download_remark">
	<input type="hidden" name="evaResultSearchEntity.evaStartTime" id="download_evaStartTime">
	<input type="hidden" name="evaResultSearchEntity.evaEndTime" id="download_evaEndTime">
</form>
<iframe name="downloadiFrame" id="downloadiFrame" src="" style="display:none;visibility:hidden;height:0px;"/>
</body>
</html>